/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package clases;

/**
 *
 * @author ser
 */
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;

public class ClsFormatoSubPresupuesto extends DefaultTableCellRenderer {

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean selected, boolean focused, int row, int column) {
        //setEnabled(table == null || table.isEnabled());
        //setBackground(Color.white);//color de fondo
        setForeground(new java.awt.Color(0, 0, 0));

        if (column == 4) {
            if (table.getValueAt(row, 4).toString().equals("Sin Procesar")) {
                //setBackground(new Color(246, 12, 23));
                setForeground(new Color(246, 12, 23));

                //setHorizontalAlignment(SwingConstants.RIGHT);//centro
            }
        }


        //si la celda contiene números


        super.getTableCellRendererComponent(table, value, selected, focused, row, column);
        return this;
    }
    //
}